home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / cgegv.z / cgegv
Text File  |  1998-10-30  |  9KB  |  265 lines

  1.  
  2.  
  3.  
  4. CCCCGGGGEEEEGGGGVVVV((((3333FFFF))))                                                            CCCCGGGGEEEEGGGGVVVV((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      CGEGV - compute for a pair of N-by-N complex nonsymmetric matrices A and
  10.      B, the generalized eigenvalues (alpha, beta), and optionally,
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE CGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA, VL, LDVL,
  14.                        VR, LDVR, WORK, LWORK, RWORK, INFO )
  15.  
  16.          CHARACTER     JOBVL, JOBVR
  17.  
  18.          INTEGER       INFO, LDA, LDB, LDVL, LDVR, LWORK, N
  19.  
  20.          REAL          RWORK( * )
  21.  
  22.          COMPLEX       A( LDA, * ), ALPHA( * ), B( LDB, * ), BETA( * ), VL(
  23.                        LDVL, * ), VR( LDVR, * ), WORK( * )
  24.  
  25. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  26.      CGEGV computes for a pair of N-by-N complex nonsymmetric matrices A and
  27.      B, the generalized eigenvalues (alpha, beta), and optionally, the left
  28.      and/or right generalized eigenvectors (VL and VR).
  29.  
  30.      A generalized eigenvalue for a pair of matrices (A,B) is, roughly
  31.      speaking, a scalar w or a ratio  alpha/beta = w, such that  A - w*B is
  32.      singular.  It is usually represented as the pair (alpha,beta), as there
  33.      is a reasonable interpretation for beta=0, and even for both being zero.
  34.      A good beginning reference is the book, "Matrix Computations", by G.
  35.      Golub & C. van Loan (Johns Hopkins U. Press)
  36.  
  37.      A right generalized eigenvector corresponding to a generalized eigenvalue
  38.      w  for a pair of matrices (A,B) is a vector  r  such that  (A - w B) r =
  39.      0 .  A left generalized eigenvector is a vector l such that l**H * (A - w
  40.      B) = 0, where l**H is the
  41.      conjugate-transpose of l.
  42.  
  43.      Note: this routine performs "full balancing" on A and B -- see "Further
  44.      Details", below.
  45.  
  46. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  47.      JOBVL   (input) CHARACTER*1
  48.              = 'N':  do not compute the left generalized eigenvectors;
  49.              = 'V':  compute the left generalized eigenvectors.
  50.  
  51.      JOBVR   (input) CHARACTER*1
  52.              = 'N':  do not compute the right generalized eigenvectors;
  53.              = 'V':  compute the right generalized eigenvectors.
  54.  
  55.      N       (input) INTEGER
  56.              The order of the matrices A, B, VL, and VR.  N >= 0.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCGGGGEEEEGGGGVVVV((((3333FFFF))))                                                            CCCCGGGGEEEEGGGGVVVV((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      A       (input/output) COMPLEX array, dimension (LDA, N)
  75.              On entry, the first of the pair of matrices whose generalized
  76.              eigenvalues and (optionally) generalized eigenvectors are to be
  77.              computed.  On exit, the contents will have been destroyed.  (For
  78.              a description of the contents of A on exit, see "Further
  79.              Details", below.)
  80.  
  81.      LDA     (input) INTEGER
  82.              The leading dimension of A.  LDA >= max(1,N).
  83.  
  84.      B       (input/output) COMPLEX array, dimension (LDB, N)
  85.              On entry, the second of the pair of matrices whose generalized
  86.              eigenvalues and (optionally) generalized eigenvectors are to be
  87.              computed.  On exit, the contents will have been destroyed.  (For
  88.              a description of the contents of B on exit, see "Further
  89.              Details", below.)
  90.  
  91.      LDB     (input) INTEGER
  92.              The leading dimension of B.  LDB >= max(1,N).
  93.  
  94.      ALPHA   (output) COMPLEX array, dimension (N)
  95.              BETA    (output) COMPLEX array, dimension (N) On exit,
  96.              ALPHA(j)/BETA(j), j=1,...,N, will be the generalized eigenvalues.
  97.  
  98.              Note: the quotients ALPHA(j)/BETA(j) may easily over- or
  99.              underflow, and BETA(j) may even be zero.  Thus, the user should
  100.              avoid naively computing the ratio alpha/beta.  However, ALPHA
  101.              will be always less than and usually comparable with norm(A) in
  102.              magnitude, and BETA always less than and usually comparable with
  103.              norm(B).
  104.  
  105.      VL      (output) COMPLEX array, dimension (LDVL,N)
  106.              If JOBVL = 'V', the left generalized eigenvectors.  (See
  107.              "Purpose", above.)  Each eigenvector will be scaled so the
  108.              largest component will have abs(real part) + abs(imag. part) = 1,
  109.              *except* that for eigenvalues with alpha=beta=0, a zero vector
  110.              will be returned as the corresponding eigenvector.  Not
  111.              referenced if JOBVL = 'N'.
  112.  
  113.      LDVL    (input) INTEGER
  114.              The leading dimension of the matrix VL. LDVL >= 1, and if JOBVL =
  115.              'V', LDVL >= N.
  116.  
  117.      VR      (output) COMPLEX array, dimension (LDVR,N)
  118.              If JOBVL = 'V', the right generalized eigenvectors.  (See
  119.              "Purpose", above.)  Each eigenvector will be scaled so the
  120.              largest component will have abs(real part) + abs(imag. part) = 1,
  121.              *except* that for eigenvalues with alpha=beta=0, a zero vector
  122.              will be returned as the corresponding eigenvector.  Not
  123.              referenced if JOBVR = 'N'.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CCCCGGGGEEEEGGGGVVVV((((3333FFFF))))                                                            CCCCGGGGEEEEGGGGVVVV((((3333FFFF))))
  137.  
  138.  
  139.  
  140.      LDVR    (input) INTEGER
  141.              The leading dimension of the matrix VR. LDVR >= 1, and if JOBVR =
  142.              'V', LDVR >= N.
  143.  
  144.      WORK    (workspace/output) COMPLEX array, dimension (LWORK)
  145.              On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  146.  
  147.      LWORK   (input) INTEGER
  148.              The dimension of the array WORK.  LWORK >= max(1,2*N).  For good
  149.              performance, LWORK must generally be larger.  To compute the
  150.              optimal value of LWORK, call ILAENV to get blocksizes (for
  151.              CGEQRF, CUNMQR, and CUNGQR.)  Then compute:  NB  -- MAX of the
  152.              blocksizes for CGEQRF, CUNMQR, and CUNGQR; The optimal LWORK is
  153.              MAX( 2*N, N*(NB+1) ).
  154.  
  155.      RWORK   (workspace/output) REAL array, dimension (8*N)
  156.  
  157.      INFO    (output) INTEGER
  158.              = 0:  successful exit
  159.              < 0:  if INFO = -i, the i-th argument had an illegal value.
  160.              =1,...,N:  The QZ iteration failed.  No eigenvectors have been
  161.              calculated, but ALPHA(j) and BETA(j) should be correct for
  162.              j=INFO+1,...,N.  > N:  errors that usually indicate LAPACK
  163.              problems:
  164.              =N+1: error return from CGGBAL
  165.              =N+2: error return from CGEQRF
  166.              =N+3: error return from CUNMQR
  167.              =N+4: error return from CUNGQR
  168.              =N+5: error return from CGGHRD
  169.              =N+6: error return from CHGEQZ (other than failed iteration)
  170.              =N+7: error return from CTGEVC
  171.              =N+8: error return from CGGBAK (computing VL)
  172.              =N+9: error return from CGGBAK (computing VR)
  173.              =N+10: error return from CLASCL (various calls)
  174.  
  175. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  176.      Balancing
  177.      ---------
  178.  
  179.      This driver calls CGGBAL to both permute and scale rows and columns of A
  180.      and B.  The permutations PL and PR are chosen so that PL*A*PR and PL*B*R
  181.      will be upper triangular except for the diagonal blocks A(i:j,i:j) and
  182.      B(i:j,i:j), with i and j as close together as possible.  The diagonal
  183.      scaling matrices DL and DR are chosen so that the pair  DL*PL*A*PR*DR,
  184.      DL*PL*B*PR*DR have elements close to one (except for the elements that
  185.      start out zero.)
  186.  
  187.      After the eigenvalues and eigenvectors of the balanced matrices have been
  188.      computed, CGGBAK transforms the eigenvectors back to what they would have
  189.      been (in perfect arithmetic) if they had not been balanced.
  190.  
  191.      Contents of A and B on Exit
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CCCCGGGGEEEEGGGGVVVV((((3333FFFF))))                                                            CCCCGGGGEEEEGGGGVVVV((((3333FFFF))))
  203.  
  204.  
  205.  
  206.      -------- -- - --- - -- ----
  207.  
  208.      If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or both),
  209.      then on exit the arrays A and B will contain the complex Schur form[*] of
  210.      the "balanced" versions of A and B.  If no eigenvectors are computed,
  211.      then only the diagonal blocks will be correct.
  212.  
  213.      [*] In other words, upper triangular form.
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.